package com.csun.dsms.model.dto.menu;

import com.csun.dsms.validator.DsmsMenuAddValidator;
import com.csun.dsms.validator.DsmsMenuEditValidator;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @author chisj chisj@foxmail.com
 * @version 1.0.0
 * @date 2021-09-02 14:23
 * @description: TODO
 */
@Data
public class EditMenuDto {

    /**
     * 菜单的Id
     */
    @NotNull(message = "{menu.id.null}",
            groups = {DsmsMenuEditValidator.class})
    private Long id;

    /**
     * 菜单的父Id
     */
    @NotNull(message = "{menu.pid.null}",
            groups = {DsmsMenuAddValidator.class})
    private Long pid;

    /**
     * 菜单编码
     */
    @NotNull(message = "{menu.code.null}",
            groups = {DsmsMenuAddValidator.class})
    @NotEmpty(message = "{menu.code.null}",
            groups = {DsmsMenuAddValidator.class})
    private String menuCode;

    /**
     * Icon编码
     */
    @NotNull(message = "{menu.icon.null}",
            groups = {DsmsMenuAddValidator.class})
    @NotEmpty(message = "{menu.icon.null}",
            groups = {DsmsMenuAddValidator.class})
    private String icon;

    /**
     * 菜单名称
     */
    @NotNull(message = "{menu.name.null}",
            groups = {DsmsMenuAddValidator.class})
    @NotEmpty(message = "{menu.name.null}",
            groups = {DsmsMenuAddValidator.class})
    private String menuName;

    /**
     * 菜单排序
     */
    private Integer number;

    /**
     * 菜单地址
     */
    private String url;

    /**
     * 备注说明
     */
    private String remark;
}
